package com.yp.pay.StrategyContext;

import com.yp.pay.strategy.PayStrategy;
import com.yp.pay.pojo.PayBody;

public class PayContext {
    private  PayStrategy payStrategy;

    public PayContext(PayStrategy payStrategy) {
        this.payStrategy = payStrategy;
    }


    public Boolean execute(PayBody payBody){
        return payStrategy.pay(payBody);
    }
}
